const int ACSPIN = A0;

float getCurrent() {
  float avgCurrent = 0.0;
  for(int i=0;i<10;i++){
    avgCurrent = abs(avgCurrent) + abs((0.048875855327468 * analogRead(A0) -25) / 1000);
    Serial.print(avgCurrent);
  }
  return avgCurrent;  
}
